#ifndef superStack_H
#define superStack_H
#include <iostream>
#include <vector>
#include "operationlog.h"
#include "operationset.h"
#include "record.h"
using namespace std;

class SuperStack
{
private:
    Operation _operation;
    vector<OperationLog> stack;
    vector<OperationLog>::iterator sp;//stack pointer;
	//operationLog _log(operation,record);//for add/delete op
	//operationLog _log(operation,record,record);//for modify op
    OperationLog log;
    OperationLog thisLog;
    bool canUndo;
	void locateStackPointer(void);
public:
    void addLog(Operation,Record,int);//for add/delete op
    void addLog(Operation,Record,Record,int);//for modify op
    bool can(Operation);//test if can undo/redo
    OperationLog getLog();
	void print();//for debugging
};

#endif // !superStack_H
